<template>
  <XtxBread>
    <XtxBreadItem to="/">首页</XtxBreadItem>
    <XtxBreadItem  :to="`/category/${category.parentId}`">
      {{category.parentName}}
    </XtxBreadItem>
    <Transition name="fade-right" mode="out-in">
      <XtxBreadItem  :key="category.id">{{category.name}}</XtxBreadItem>
    </Transition>
  </XtxBread>
</template>
<script>
import { inject } from 'vue'
export default {
  name: 'SubBread',
  setup () {
    const category = inject('subData')
    // console.log(category)
    return { category }
  }
}
</script>
